package com.baixun.gassystem.service.impl;

import com.baixun.gasentity.entity.SysVideoMonitorList;
import com.baixun.gassystem.mapper.SysVideoMonitorListMapper;
import com.baixun.gassystem.service.SysVideoMonitorListService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 视频监控列表的服务实现类
 * 实现分页查询和不分页查询功能，支持根据场站名称和报警类型进行筛选
 */
@Service
public class SysVideoMonitorListServiceImpl implements SysVideoMonitorListService {

    @Autowired
    private SysVideoMonitorListMapper sysVideoMonitorListMapper;

    /**
     * 分页查询视频监控记录
     */
    @Override
    public IPage<SysVideoMonitorList> selectByStationAndTypeWithPagination(Page<SysVideoMonitorList> page,
                                                                           String stationName,
                                                                           String alarmType) {
        return sysVideoMonitorListMapper.selectByStationAndTypeWithPagination(page, stationName, alarmType);
    }

    /**
     * 不分页查询视频监控记录
     */
    @Override
    public List<SysVideoMonitorList> selectByStationAndType(String stationName, String alarmType) {
        return sysVideoMonitorListMapper.selectByStationAndType(stationName, alarmType);
    }
}
